from appium import webdriver
from case.case import Case
from selenium.webdriver.common.by import By
from time import sleep
class Guanzhu(Case):
    guanzhuanniu=(By.ID,'com.kongfz.app:id/lav_2')
    shousuokuang=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout[2]/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout')
    shousuodingwei='new UiSelector().text("动态 书友 话题")'
    dianjisousuo = (By.XPATH,'//android.widget.TextView[@text = "搜索"]')
    guanzhu = (By.ID,'com.kongfz.app:id/lottie_attention')
    dy=(By.ID,'com.kongfz.app:id/tv_navigation')
    def guanzhuyewu(self,fulll):
        self.loc_ele(self.guanzhuanniu).click()
        sleep(2)
        self.loc_ele(self.shousuokuang).click()
        sleep(2)
        self.loc_ui_ele(self.shousuodingwei).send_keys(fulll)
        sleep(2)
        self.loc_wait_ele(self.dianjisousuo).click()
        sleep(2)
        self.loc_ele(self.guanzhu).click()




